/*
 * MeeleEnemy.h
 *
 *  Created on: 06/08/2013
 *      Author: munhra
 */

#ifndef MEELEENEMY_H_
#define MEELEENEMY_H_

#include "cocos2d.h"
#include "Player.h"

using namespace cocos2d;

class MeeleEnemy : public CCSprite {

public:

	CCPoint velocity;
	CCPoint desiredPosition;
	bool onGround;
	bool forwardMarch;
	bool backwardMarch;
	bool shoot;
	bool stop;
	bool mightAsWellJump;
	bool onJump;
	bool killEnemy;

	CCAction *walkAnimation;
	CCAction *stopAnimation;
	CCAction *jumpAnimation;
	CCAction *deathAnimation;
	CCAction *atackAnimation;

	Player *player;

	static MeeleEnemy* create(const char *filename);
	CCRect collisionBoundingBox();
	void update(float dt);
	void initMeeleEnemy(Player *playerReference);
	bool doScanForTarget();
	bool doMoveToTarget();
	void doStop();
	void doAction();

private:

	void defineAnimations();

};

#endif /* MEELEENEMY_H_ */
